
Technical Q&A's
TB 16 - Detecting the Microseconds Trap (1-June-95)
Q I am creating FAT applications, and I'm using the Microseconds trap. This helps
to keep my common source code simple, because I don't have to use the Time
Manager to do timings on 68K machines and Microseconds on PPC machines. Which
versions of the System software include the Microseconds trap, and on which
models is this included?
A You have to detect the availability of the Micrososeconds trap with the
TrapAvailable routine, because its availability varies with the software that
is installed and on the version of the System software that is used.
Microseconds was first implemented in QuickTime, which could optionally be
installed as far back as System 6.0.7. Microseconds wasn't officially
documented until the release of Inside Macintosh: Operating System
Utilities.
The following code can be used to detect the Microseconds trap:
#define _Microseconds 0xa193 // from traps.h
if (GetToolTrapAddress(_Microseconds) == GetToolTrapAddres(_Unimplemented))
// use extended time manager
else
// use Microseconds
Technical Support
Technical Q&As
Previous Question | Contents | Next Question

Main |
Page One |
What's New |
Apple Computer, Inc. |
Find It |
Contact Us |
Help